﻿@using CleanArchitecture.Infrastructure.Entities 
@using CleanArchitecture.Infrastructure.Entities.Business
@model (NewsItem, NewsItem)
@{ 
    string backUrl = ViewBag.BackToUrl as string ?? "";
    var prevNews = Model.Item1;
    var nextNews = Model.Item2;
}

<section class="pagingbox">
    <p class="prev fl">
        <a href="@(prevNews == null ? "#" : Url.RouteUrl("ArticleDetail", new { columnhash = prevNews.FKColumnId.IdEncode(), itemhash = prevNews.Id.IdEncode() }))">上一篇：@(prevNews == null ? "暂无数据" : prevNews.Title)</a>
    </p>
    @if(!string.IsNullOrEmpty(backUrl))
    {
    <a class="golist fl" href="@backUrl"><span>返回列表</span></a>
    }
    <p class="next fr">
        <a href="@(nextNews == null ? "#" : Url.RouteUrl("ArticleDetail", new { columnhash = nextNews.FKColumnId.IdEncode(), itemhash = nextNews.Id.IdEncode() }))">下一篇：@(nextNews == null ? "暂无数据" : nextNews.Title)</a>
    </p>
    <p class="clear"></p>
</section>